import { SheetComponent } from '@antv/s2-react'
import '@antv/s2-react/dist/style.min.css'
import useS2 from '../hooks/s2/useS2'

const S2Chart = ({ widgetId }) => {
  const { s2DataConfig, s2Options } = useS2(widgetId)

  return <SheetComponent dataCfg={s2DataConfig} options={s2Options} />
}

export default S2Chart
